﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Entity.Core;

namespace CreateEntity
{
    public partial class Config : Form
    {
        CodeVersion codeVersion = new CodeVersion();
        public Config()
        {
            InitializeComponent();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            if (this.net2.Checked)
            {

                codeVersion.WriteVersion("2.0");
            }
            else
            {
                codeVersion.WriteVersion("3.0");
            }
            this.Close();
        }

        private void Config_Load(object sender, EventArgs e)
        {
            if (codeVersion.IsVersion2)
            {
                this.net2.Checked = true;
            }
            else
            {
                this.net3.Checked = true;
            }
        }

    }
}
